﻿using System.Threading;

namespace BlueportCoffee.RobotModel
{
    public class RobotModelLeft
    {
        private static RobotModelLeft instance;
        private RobotModelLeft() { }
        public static RobotModelLeft Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new RobotModelLeft();
                }
                return instance;
            }
        }
        public void QK()
        {
            try
            {
                Thread.Sleep(100);
                Instance.RobotKSZZ_Down();
                Thread.Sleep(100);
                Instance.RobotKFP_Down();
                Thread.Sleep(100);
                Instance.RobotNCP_Down();
                Thread.Sleep(100);
                Instance.RobotHHP_Down();
                Thread.Sleep(100);
                Instance.RobotQBJC_Down();
                Thread.Sleep(100);
                Instance.RobotWBTZ_Down();
                Thread.Sleep(100);
                Instance.RobotJBCG_Down();
                Thread.Sleep(100);
                Instance.RobotQJB_Down();
                Thread.Sleep(100);
                Instance.RobotQKFJ_Down();
                Thread.Sleep(100);
                Instance.RobotQNCJ_Down();
                Thread.Sleep(100);
                Instance.RobotQKS_Down();
                Thread.Sleep(100);
                Instance.RobotQYM_Down();
                Thread.Sleep(100);
                Instance.RobotQYG_Down();
                Thread.Sleep(100);
                Instance.RobotQTZ_Down();
                Thread.Sleep(100);
                Instance.RobotQCC1_Down();
                Thread.Sleep(100);
                Instance.RobotQCC2_Down();
                Thread.Sleep(100);
                Instance.RobotQCC3_Down();
                Thread.Sleep(100);
                Instance.RobotQCC4_Down();
                Thread.Sleep(100);
                Instance.RobotCBWC_Down();
                Thread.Sleep(100);
                Instance.RobotCKFWC_Down();
                Thread.Sleep(100);
                Instance.RobotCNCWC_Down();
                Thread.Sleep(100);
                Instance.RobotKSWC_Down();
                Thread.Sleep(100);
                Instance.RobotQTZ_Down();
                Thread.Sleep(100);
                Instance.RobotTZWC_Down();
                Thread.Sleep(100);
                Instance.RobotQJB16_Down();
                Thread.Sleep(100);
                Instance.RobotQJB22_Down();
                Thread.Sleep(100);
                Instance.RobotQJBL_Down();
                Thread.Sleep(100);
                Instance.RobotQJB12_Down();
                Thread.Sleep(100);
                Instance.RobotWGWM_Down();
                Thread.Sleep(100);
            }
            catch (System.Exception)
            {
            }
        }
        #region 机器人左臂操作
        /// <summary>
        /// 开始制作 开 DI1
        /// </summary>
        public void RobotKSZZ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1025, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 开始制作 关 DI1
        /// </summary>
        public void RobotKSZZ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1025, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 咖啡品 开 DI2
        /// </summary>
        public void RobotKFP_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1026, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 咖啡品 关 DI2
        /// </summary>
        public void RobotKFP_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1026, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 奶茶品 开 DI3
        /// </summary>
        public void RobotNCP_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1027, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 奶茶品 关 DI3
        /// </summary>
        public void RobotNCP_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1027, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 混合品 开 DI4
        /// </summary>
        public void RobotHHP_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1028, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 混合品 关 DI4
        /// </summary>
        public void RobotHHP_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1028, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 取杯检测 开 DI5
        /// </summary>
        public void RobotQBJC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1029, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 取杯检测 关 DI5
        /// </summary>
        public void RobotQBJC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1029, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 无杯通知 开 DI6
        /// </summary>
        public void RobotWBTZ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1030, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 无杯通知 关 DI6
        /// </summary>
        public void RobotWBTZ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1030, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯成功 开 DI7
        /// </summary>
        public void RobotJBCG_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1031, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯成功 关 DI7
        /// </summary>
        public void RobotJBCG_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1031, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去加冰 开 DI8
        /// </summary>
        public void RobotQJB_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1032, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去加冰 关 DI8
        /// </summary>
        public void RobotQJB_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1032, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去咖啡机 开 DI9
        /// </summary>
        public void RobotQKFJ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1033, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去咖啡机 关 DI9
        /// </summary>
        public void RobotQKFJ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1033, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去奶茶机 开 DI10
        /// </summary>
        public void RobotQNCJ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1034, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去奶茶机 关 DI10
        /// </summary>
        public void RobotQNCJ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1034, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去开水 开 DI11
        /// </summary>
        public void RobotQKS_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1035, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去开水 关 DI11
        /// </summary>
        public void RobotQKS_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1035, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去压膜 开 DI12
        /// </summary>
        public void RobotQYM_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1036, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去压膜 关 DI12
        /// </summary>
        public void RobotQYM_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1036, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去压盖 开 DI13
        /// </summary>
        public void RobotQYG_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1037, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去压盖 关 DI13
        /// </summary>
        public void RobotQYG_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1037, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去贴纸 开 DI14
        /// </summary>
        public void RobotQTZ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1038, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去贴纸 关 DI14
        /// </summary>
        public void RobotQTZ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1038, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐1 开 DI15
        /// </summary>
        public void RobotQCC1_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1039, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐1 关 DI15
        /// </summary>
        public void RobotQCC1_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1039, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐2 开 DI16
        /// </summary>
        public void RobotQCC2_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1040, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐2 关 DI16
        /// </summary>
        public void RobotQCC2_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1040, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐3 开 DI17
        /// </summary>
        public void RobotQCC3_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1041, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐3 关 DI17
        /// </summary>
        public void RobotQCC3_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1041, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐4 开 DI18
        /// </summary>
        public void RobotQCC4_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1042, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐4 关 DI18
        /// </summary>
        public void RobotQCC4_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1042, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出冰完成 开 DI19
        /// </summary>
        public void RobotCBWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1043, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出冰完成 关 DI19
        /// </summary>
        public void RobotCBWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1043, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出咖啡完成 开 DI20
        /// </summary>
        public void RobotCKFWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1044, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出咖啡完成 关 DI20
        /// </summary>
        public void RobotCKFWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1044, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出奶茶完成 开 DI21
        /// </summary>
        public void RobotCNCWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1045, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出奶茶完成 关 DI21
        /// </summary>
        public void RobotCNCWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1045, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 开水完成 开 DI22
        /// </summary>
        public void RobotKSWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1046, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 开水完成 关 DI22
        /// </summary>
        public void RobotKSWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1046, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 贴纸完成 开 DI23
        /// </summary>
        public void RobotTZWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1047, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 贴纸完成 关 DI23
        /// </summary>
        public void RobotTZWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1047, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接杯 开 DI24
        /// </summary>
        public void RobotQJBL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1048, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///去接杯 关 DI24
        /// </summary>
        public void RobotQJBL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1048, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接杯16 开 DI25
        /// </summary>
        public void RobotQJB16_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1049, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///去接杯16 关 DI25
        /// </summary>
        public void RobotQJB16_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1049, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接杯22 开 DI26
        /// </summary>
        public void RobotQJB22_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1050, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///去接杯22 关 DI26
        /// </summary>
        public void RobotQJB22_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1050, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接盖 开 DI27
        /// </summary>
        public void RobotQJG_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1051, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///去接盖 关 DI27
        /// </summary>
        public void RobotQJG_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1051, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接盖完成 开 DI28
        /// </summary>
        public void RobotJGWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1052, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///接盖完成 关 DI28
        /// </summary>
        public void RobotJGWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1052, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接杯120z 开 DI29
        /// </summary>
        public void RobotQJB12_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1053, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///去接杯12oz 关 DI29
        /// </summary>
        public void RobotQJB12_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1053, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 无盖无膜贴标 开 DI29
        /// </summary>
        public void RobotWGWM_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1054, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///无盖无膜贴标 关 DI29
        /// </summary>
        public void RobotWGWM_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1054, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人停止运行左 开 30
        /// </summary>
        public void RobotJQRTZYXL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人停止运行左 关 30
        /// </summary>
        public void RobotJQRTZYXL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人运行左 开 31
        /// </summary>
        public void RobotJQRYXL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)0, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人运行左 关 31
        /// </summary>
        public void RobotJQRYXL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)0, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人报警确认左 开 32
        /// </summary>
        public void RobotJQRBJQRL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)5, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人报警确认左 关 32
        /// </summary>
        public void RobotJQRBJQRL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)5, false);
            }
            catch
            {
            }
        }
        ///// <summary>
        ///// 机器人上电左 开 33
        ///// </summary>
        //public void RobotJQRSDL_UP()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1254, true);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        /////  机器人上电左 关 33
        ///// </summary>
        //public void RobotJQRSDL_Down()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1254, false);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        ///// 机器人下电左 开 34
        ///// </summary>
        //public void RobotJQRXDL_UP()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1255, true);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        /////  机器人下电左 关 34
        ///// </summary>
        //public void RobotJQRXDL_Down()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1255, false);
        //    }
        //    catch
        //    {
        //    }
        //}
        /// <summary>
        /// 机器人使能左 开 35
        /// </summary>
        public void RobotJQRSNL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)3, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人使能左 关 35
        /// </summary>
        public void RobotJQRSNL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)3, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人下使能左 开 36
        /// </summary>
        public void RobotJQRXSNL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)4, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人下使能左 关 36
        /// </summary>
        public void RobotJQRXSNL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)4, false);
            }
            catch
            {
            }
        }
        ///// <summary>
        ///// 机器人暂停左 开 37
        ///// </summary>
        //public void RobotJQRZTL_UP()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1258, true);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        /////  机器人暂停左 关 37
        ///// </summary>
        //public void RobotJQRZTL_Down()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1258, false);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        ///// 机器人继续运行左 开 38
        ///// </summary>
        //public void RobotJQRJXYXL_UP()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1259, true);
        //    }
        //    catch
        //    {
        //    }
        //}
        ///// <summary>
        /////  机器人继续运行左 关 38
        ///// </summary>
        //public void RobotJQRJXYXL_Down()
        //{
        //    try
        //    {
        //        RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)1259, false);
        //    }
        //    catch
        //    {
        //    }
        //}
        #endregion
        #region 机器人左臂查询
        /// <summary>
        /// 到原点 1101
        /// </summary>
        public bool LRobotDYD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1101, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到落杯器 1102
        /// </summary>
        public bool LRobotDLBQ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1102, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 接杯成功 1103
        /// </summary>
        public bool LRobotJBCG_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1103, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到制冰机 1104
        /// </summary>
        public bool LRobotDZBJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1104, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到咖啡机 1105
        /// </summary>
        public bool LRobotDKFJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1105, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到奶茶机 1106
        /// </summary>
        public bool LRobotDNCJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1106, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到开水机 1107
        /// </summary>
        public bool LRobotDKSJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1107, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 压膜完成 1108
        /// </summary>
        public bool LRobotDYMJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1108, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到压盖 1109
        /// </summary>
        public bool LRobotDYG_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1109, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        ///到贴纸 1110
        /// </summary>
        public bool LRobotDTZ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1110, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 交付完成 1111
        /// </summary>
        public bool LRobotZSWC_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1111, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 去接杯检测 1112
        /// </summary>
        public bool LRobotQJBJC_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1112, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到接盖 1113
        /// </summary>
        public bool LRobotDJG_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadCoils(1, (ushort)1113, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }

        /// <summary>
        /// 机器人1运行 30
        /// </summary>
        public bool LRobotJQRYX_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)0, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1报警 31
        /// </summary>
        public bool LRobotJQRBJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)8, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        ///// <summary>
        ///// 机器人1急停 32
        ///// </summary>
        //public bool LRobotQJRJT_Sel()
        //{
        //    try
        //    {
        //        return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)1153, (ushort)1)[0];
        //    }
        //    catch
        //    {
        //        return false;
        //    }
        //}
        ///// <summary>
        ///// 机器人1已开机 33
        ///// </summary>
        //public bool LRobotJQRYKJ_Sel()
        //{
        //    try
        //    {
        //        return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)1154, (ushort)1)[0];
        //    }
        //    catch
        //    {
        //        return false;
        //    }
        //}
        /// <summary>
        /// 机器人1已上电 34
        /// </summary>
        public bool LRobotJQRYSD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)6, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1已使能 35
        /// </summary>
        public bool LRobotJQRYSN_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)7, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        ///// <summary>
        ///// 机器人1暂停 36
        ///// </summary>
        //public bool LRobotJQRZT_Sel()
        //{
        //    try
        //    {
        //        return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)1157, (ushort)1)[0];
        //    }
        //    catch
        //    {
        //        return false;
        //    }
        //}
        ///// <summary>
        ///// 机器人1运动中 37
        ///// </summary>
        //public bool LRobotJQRYDZ_Sel()
        //{
        //    try
        //    {
        //        return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)1158, (ushort)1)[0];
        //    }
        //    catch
        //    {
        //        return false;
        //    }
        //}
        #endregion
    }
}
